<template>
	<view>
		<cu-custom :bgColor="'bg-red'" :isBack="false">
			<block slot="content">个人中心</block>
		</cu-custom>
		
		<view class="top-box">
			
			<view class="top-content">
				<!-- #ifdef APP-VUE -->
				<view class="empty-box"></view>
				<!-- #endif -->
				<view class="notice-box">
					<view class="notice" @tap="goPage('/pages/member/notice/index')">
						<image src="@/static/icon-notice.png"></image>
						<view class="cu-tag badge" v-if="notity && notity.remind_count>0">{{notity.remind_count}}</view>
					</view>
				</view>
				
				<view class="user-info">
					<block v-if="member">
						<view class="avatar">
							<image v-if="member && member.head_portrait" :src="member.head_portrait" mode="aspectFill" style="border-radius: 50%;"></image>
							<image v-else src="@/static/default-avatar.png" mode="aspectFill"></image>
						</view>
						<view class="info">
							<view class="username-setting">
								<view class="username" v-if="member.nickname">{{member.nickname}}</view>
								<view class="username" v-else>未填写</view>
								<view class="note-box"  @tap="goPage('/pages/member/edit')">
									<image src="@/static/icon-setting.png"></image>
									<view class="note">设置<text class="cuIcon cuIcon-right"></text></view>
								</view>
							</view>
							<view class="level-time">
								<view class="level-detail">
									<image src="../../static/center-level.png">
										
									</image>
									<text>{{member.level.name}}</text>
								</view>
								
								<view class="level-detail" v-if="member && (member.store_nid>0 || member.network_nid>0)">
									<image src="../../static/center-level.png">
									</image>
									<!-- <text v-if="member.levelTab" @tap="goPage('/pages/shop/whole_list?cate_id=76')">{{member.levelTab.name}}</text>
									
									<text v-else @tap="goPage('/pages/shop/member_list')">我要升级</text> -->
									<text class="text-while" v-if="member && member.store_nid>0 && member.network_nid<1">
										酒库
									</text>
									<text class="text-while" v-if="member && member.network_nid>0 && member.store_nid<1">
										网点
									</text>
									<text class="text-while" v-if="member &&  member.store_nid>0 && member.network_nid>0">
										酒库/网点
									</text>
								</view>
							</view>
						</view>
					</block>
					<block v-else>
						<view class="text-black text-lg padding-tb-sm" @tap="goPage('/pages/site/login')">HI.登录/注册</view>
					</block>
				</view>
					
				<view class="id-box" v-if="member">
					<view>会员ID:<text>{{member.id}}</text></view>
					<view>邀请码:<text>{{member.id}}</text></view>
					<view>推荐人ID:<text>{{member.channel_pid}}</text></view>
				</view>
			</view>
		</view>
			
		
		
		<view class="round-white-box whole-data-box" style="position: relative;top: -140rpx;">
			<!-- <view class="topic-line" @tap="goPage('/pages/member/interval/index')">
				<view class="title">积分统计</view>
			</view>
			<view class="total-action" >
				<view class="total" @tap="goPage('/pages/member/interval/index')">
					<view class="text-price">{{statistics && statistics.acc.user_integral > 0 ? statistics.acc.user_integral : '0.00'}}</view>
					<view class="txt">可结算积分</view>
				</view>
				<view class="action a-empty" @tap="goPage('/pages/member/interval/recharge')">账户充值</view>
				<view class="action a-full" @tap="goPage('/pages/member/withdraw/apply?type=integral')">立即结算</view>
			</view> -->
			<view class="data-box c4">
				<view class="item" @tap="goPage('/pages/member/recharge/log')">
					<text class="num">{{statistics && statistics.acc.user_money > 0 ? statistics.acc.user_money : '0.00'}}</text>
					<text class="note">余额</text>
				</view>
				<view class="item" @tap="goPage('/pages/member/interval/index')">
					<text class="num">{{statistics && statistics.acc.user_integral > 0 ? statistics.acc.user_integral : '0.00'}}</text>
					<text class="note">积分</text>
				</view>
				<view class="item" @tap="goPage('/pages/member/recharge/log')">
					<text class="num">{{statistics && statistics.acc.accumulate_money > 0 ? statistics.acc.accumulate_money : '0.00'}}</text>
					<text class="note">累计收益</text>
				</view>
				<view class="item" @tap="goPage('/pages/member/coupon')">
					<text class="num">{{statistics && statistics.member_coupon > 0 ? statistics.member_coupon : '0'}}</text>
					<text class="note">会员包</text>
				</view>
				<!-- <view class="item" @tap="goPage('/pages/member/wait_integral/wait_integral')">
					<text class="num">{{statistics && statistics.acc.wait_integral > 0 ? statistics.acc.wait_integral : '0.00'}}</text>
					<text class="note">钱包余额</text>
				</view> -->
				<!-- <view class="item" @tap="goPage('/pages/member/withdraw/apply')">
					<text class="action a-full">提现</text>
				</view> -->
				<!-- <view class="item" @tap="goPage('/pages/member/wait_integral/wait_integral')">
					<text class="num">{{statistics && statistics.acc.wait_integral > 0 ? statistics.acc.wait_integral : 0}}</text>
					<text class="note">待收益</text>
				</view> -->
				<!-- <view class="item">
					<text class="num">{{statistics && statistics.acc.gold > 0 ? statistics.acc.gold : 0}}</text>
					<text class="note">贡献值</text>
				</view>
				<view class="item" @tap="goPage('/pages/member/been/weight_exchange_list')">
					<text class="num">{{statistics && statistics.money_weight > 0 ? statistics.money_weight : 0}}</text>
					<text class="note">分红权</text>
				</view> -->
			</view>
		</view>
		<view class="round-white-box my-order">
			
			<view class="menu-list">	
				<view class="menu-item" @tap="goPage('/pages/shop/order/index?status=0')">
					<view class="thumb">
						<text v-if="member && member.order_synthesize_num[0] > 0">{{member.order_synthesize_num[0]}}</text>
						<image src="@/static/red/order-menu-4.png"></image>
					</view>
					<view class="name">待付款</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/shop/order/index?status=1')">
					<view class="thumb">
						<text v-if="member && member.order_synthesize_num[1] > 0">{{member.order_synthesize_num[1]}}</text>
						<image src="@/static/red/order-menu-2.png"></image>
					</view>
					<view class="name">待发货</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/shop/order/index?status=2')">
					<view class="thumb">
						<text v-if="member && member.order_synthesize_num[2] > 0">{{member.order_synthesize_num[2]}}</text>
						<image src="@/static/red/order-menu-3.png"></image>
					</view>
					<view class="name">待收货</view>
				</view>
				
				<view class="menu-item" @tap="goPage('/pages/shop/order/index?status=3')">
					<view class="thumb">
						<text v-if="member && member.order_synthesize_num[3] > 0">{{member.order_synthesize_num[3]}}</text>
						<image src="@/static/red/order-menu-5.png"></image>
					</view>
					<view class="name">待评价</view>
				</view> 
				<!-- <view class="menu-item" @tap="goPage('/pages/shop/order/index?status=4')">
					<view class="thumb">
						<text v-if="member && member.order_synthesize_num[4] > 0">{{member.order_synthesize_num[4]}}</text>
						<image src="@/static/red/order-menu-4.png"></image>
					</view>
					<view class="name">退款退货</view>
				</view> -->
			</view> 
		 </view>
		
		<view class="round-white-box whole-data-box" style="display: none;">
			<view class="topic-line">
				<view class="title">余额统计</view>
			</view>
			<view class="total-action">
				<view class="total" @tap="goPage('/pages/member/recharge/log')">
					<view class="text-price">{{statistics && statistics.acc.user_money > 0 ? statistics.acc.user_money : '0.00'}}</view>
					<view class="txt">可结算余额</view>
				</view>
				<!-- <view class="action a-empty" @tap="goPage('/pages/member/recharge/index')">账户充值</view> -->
				<view class="action a-full" @tap="goPage('/pages/member/withdraw/apply')">立即结算</view>
			</view>
			<view class="data-box c4">
				
			</view>
		</view>
		<view class="round-white-box whole-data-box " style="margin-top: -90rpx;padding-bottom:0;background-color: #333333;">
			
			<view class="total-action">
				<view class="total" @tap="goPage('/pages/member/comshare')">
					
					<view class="text-price-thing">
						<view style="color: #FFFFFF;">酒百万俱乐部</view>
						<view style="color: #FFFFFF;">购物省钱.分享赚钱</view>
					</view>
				</view>
				<view class="action a-full" @tap="goPage('/pages/member/comshare')">分享好友</view>
			</view>
			
		</view> 
		
		<view class="round-white-box my-service">
			<view class="topic-line">
				<view class="title">我的服务</view>
				<!-- <view class="more" @tap="goPage('/pages/shop/order/index')">查看全部订单<text class="cuIcon cuIcon-right"></text></view> -->
			</view>
			<view class="menu-list">
				
				<!-- 
				<view class="menu-item" @tap="goPage('/pages/member/withdraw/index')">
					<view class="thumb">
						
						<image src="@/static/red/ser-2.png"></image>
					</view>
					<view class="name">提现记录</view>
				</view> -->
				<view class="menu-item" @tap="goPage('/pages/income/balance_change')">
					<view class="thumb">
						<image src="@/static/red-new/ser-3.png"></image>
					</view>
					<view class="name">转账</view>
				</view> 
				<view class="menu-item" @tap="goPage('/pages/member/deliver_list')">
					<view class="thumb">
						<image src="@/static/red-new/ser-9.png"></image>
					</view>
					<view class="name">酒库查询</view>
				</view> 
				<view class="menu-item" @tap="goPage('/pages/member/member_apply')" >
					<view class="thumb">
						<image src="@/static/red-new/ser-8.png"></image>
					</view>
					<view class="name" >酒库申请</view>
					
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/withdraw/apply')">
					<view class="thumb">
						<image src="@/static/red-new/ser-7.png"></image>
					</view>
					<view class="name">提现</view>
				</view>
				<!-- <view class="menu-item" @tap="goPage('/pages/member/wait_integral/index')">
					<view class="thumb">
						<image src="@/static/red-new/ser-5.png"></image>
					</view>
					<view class="name">代销详情</view>
				</view> -->
				<!-- <view class="menu-item" @tap="goPage('/pages/shop/vip_list')">
					<view class="thumb">
						<image src="@/static/red-new/ser-6.png"></image>
					</view>
					<view class="name">预售</view>
				</view> -->
				<!-- @tap="showShare" -->
				<!-- <view class="menu-item" @tap="goPage('/pages/member/comshare')"> 
					
					<view class="thumb">
						<image src="@/static/red-new/ser-4.jpg"></image>
					</view>
					<view class="name">推广海报</view>
				</view> -->
				<view class="menu-item" @tap="goPage('/pages/member/team/index')">
					<view class="thumb">
						<image src="@/static/red/ser-5.png"></image>
					</view>
					<view class="name">我的市场</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/word_index')">
					<view class="thumb">
						<image src="@/static/red/ser-6.png"></image>
					</view>
					<view class="name">我的酒库</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/word_apply')">
					<view class="thumb">
						<image src="@/static/red-new/ser-6.png"></image>
					</view>
					<view class="name">网点申请</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/word_order')">
					<view class="thumb">
						<image src="@/static/red/ser-2.png"></image>
					</view>
					<view class="name">我的网点</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/word_store')">
					<view class="thumb">
						<image src="@/static/red-new/ser-5.png"></image>
					</view>
					<view class="name">分红申请</view>
				</view>
				<!-- #ifdef MP-WEIXIN -->
				<button class="menu-item" open-type="contact">
					<view class="thumb">
						<image src="@/static/red-new/service-menu-2.jpg"></image>
					</view>
					<view class="name">联系客服</view>
				</button>
				<!-- #endif -->
				<!-- #ifndef MP-WEIXIN -->
				<view class="menu-item" @tap="showService">
					<view class="thumb">
						<image src="@/static/red-new/service-menu-2.jpg"></image>
					</view>
					<view class="name">联系客服</view>
				</view>
				<!-- #endif -->
				<view class="menu-item" @tap="goPage('/pages/member/group_buy/index')">
					<view class="thumb">
						<image src="@/static/red/ser-8.png"></image>
					</view>
					<view class="name">收益详情</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/income/integral_recharge')">
					<view class="thumb">
						<image src="@/static/member_guquan.png"></image>
					</view>
					<view class="name">股权查询</view>
				</view>
				<!-- <view class="menu-item" @tap="goPage('/pages/member/been/exchange')">
					<view class="thumb">
						<image src="../../static/kf.png"></image>
					</view>
					<view class="name">分红兑换</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/income/integral_recharge')">
					<view class="thumb">
						<image src="../../static/kf.png"></image>
					</view>
					<view class="name">趣豆兑换</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/card/card')">
					<view class="thumb">
						<image src="../../static/kf.png"></image>
					</view>
					<view class="name">快付卡片</view>
				</view> -->
				<!-- <view class="menu-item" @tap="goPage('/pages/shop/present_list')">
					<view class="thumb">
						
						<image src="../../static/red/kf.png"></image>
					</view>
					<view class="name">赠品管理</view>
				</view> -->
				<!-- <view class="menu-item" @tap="goPage('/pages/shop/pass_list')">
					<view class="thumb">
						<image src="../../static/red-new/kf2.png"></image>
						<view class="cu-tag badge" v-if="statistics && statistics.mem_rev>0">{{statistics.mem_rev}}</view>
					</view>
					<view class="name">审批管理</view>
				</view>
				<view class="menu-item" @tap="goPage('/pages/member/top_list')">
					<view class="thumb">
						<image src="https://memexiu-1307808312.cos.ap-guangzhou.myqcloud.com/images/2021/11/24/image_1637743603_GpW01zIz.png"></image>
					</view>
					<view class="name">排行榜</view>
				</view> -->
				<view class="menu-item" @tap="goPage('/pages/member/setting')">
					<view class="thumb">
						<image src="@/static/red/ser-1.png"></image>
					</view>
					<view class="name">修改资料</view>
				</view>
				<!-- <view class="menu-item" @tap="goPage('/pages/shop/marketing/points_lottery')">
					<view class="thumb">
					    
						<image src="../../static/red/kf44.png"></image>
						<view class="cu-tag badge" v-if="statistics && statistics.acc.golden_eggs>0">{{statistics.acc.golden_eggs}}</view>
					</view>
					<view class="name">抽奖</view>
				</view> -->
			</view>
		</view>
		
		<view class="cu-modal" :class="modalName=='Image'?'show':''">
			<view class="cu-dialog">
				<image v-if="gzh_code" :src="gzh_code"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<image v-else src="@/static/icon-gzh.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<!-- <view class="close-btn" @click="hideModal">关闭</view> -->
				<view class="close-btn" >请关注公众号后刷新</view>
			</view>
		</view>
		<view class="cu-modal" :class="modalName=='next_pid'?'show':''">
			<view class="cu-dialog">
				<image src="@/static/red/shenpi.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<view class="close-btn" @click="onclode(statistics.next_data.id)"  v-if="statistics">关闭</view>
			</view>
		</view>
		<view class="cu-modal" :class="modalName=='s_hei'?'show':''">
			<view class="cu-dialog">
				<image src="@/static/sh_pass.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<view class="close-btn" @click="onclode(statistics.m_revice.id)"  v-if="statistics">关闭</view>
			</view>
		</view>
		<view class="cu-modal" :class="modalName=='not_pass'?'show':''">
			
			<view class="cu-dialog">
				<view class="action" bindtap="hideModal">
					<text class="cuIcon-close text-red "></text> 
				</view> 
				<image src="@/static/not_pass.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<view class="close-btn" @click="onclode(statistics.m_revice.id)"  v-if="statistics">关闭</view>
			</view>
		</view>
		
		<view class="cu-modal" :class="modalName=='is_win'?'show':''">
			
			<view class="cu-dialog show-none" @click="gz_win(statistics.w_log.id)" v-if="statistics">
				<!-- bg-white -->
					<view class="cu-bar  justify-end show-none"> 
						<view class="action" bindtap="hideModal">
							<text class="cuIcon-close text-red"></text> 
						</view>
					</view>
					<image src="@/static/red/gxzj.png"
					 mode="aspectFill" class="gzh_qrcode"></image>
				
				<!-- <view class="close-btn" @click="gz_win(statistics.w_log.id)" v-if="statistics">去抽奖</view> -->
			</view>
		</view>
		
		<!-- <view class="cu-modal show"> -->
		<view class="cu-modal" :class="modalName=='isnot_win'?'show':''">
			<view class="cu-dialog show-none" @click="gz_win(statistics.w_log.id)" v-if="statistics">
				<!-- bg-white -->
				<view class="cu-bar  justify-end">
					<view class="action" bindtap="hideModal">
						<text class="cuIcon-close text-red"></text> 
					</view>
				</view>
				<image src="@/static/red/hyh.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
				<!-- <view class="close-btn" @click="gz_win(statistics.w_log.id)" v-if="statistics">查看积分</view> -->
			</view>
		</view>
		
		<view class="cu-modal" :class="modalName=='join_pay'?'show':''">
			<view class="cu-dialog show-none" @click="payjoin_close(statistics.join_pay.id)" v-if="statistics">
				<view class="cu-bar  justify-end">
					<view class="action" bindtap="hideModal">
						<text class="cuIcon-close text-red"></text> 
					</view>
				</view>
				<image src="@/static/qiangou.png"
				 mode="aspectFill" class="gzh_qrcode"></image>
			</view>
		</view>
		
	<!-- 	<view class="cu-modal show"> 
			<view class="cu-dialog"> 
				<view class="cu-bar bg-white justify-end"> 
					<view class="content">
						Modal标题
					</view> 
					<view class="action" bindtap="hideModal"> 
						<text class="cuIcon-close text-red"></text> 
					</view> 
				</view> 
				<view class="padding-xl text-left">
				  Modal 内容。 
				</view> 
			</view> 
		</view> -->
		
		<!-- <view class="page_footer">
			<image @tap="onLocation" src="../../static/location.png" style="width: 80px;height: 80px;float: right;margin-right: 15px;"></image>
		</view> -->
		
		<ShareView ref="ShareView"></ShareView>
		<serviceView ref="serviceView"></serviceView>
		<Foot></Foot>
		<Navbar ref="navbar" PageCur="member"></Navbar>
	</view>
</template>

<script>
	import ShareView from '@/components/default/ShareView.vue'
	import serviceView from '@/components/default/serviceView.vue'
	import Navbar from '@/components/default/Navbar.vue'
	import Foot from '@/components/default/foot.vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	export default {
		name: "member",
		components: {
			ShareView,
			serviceView,
			Foot,
			Navbar
		},
		computed: mapState(['forcedLogin', 'hasLogin', 'channelLogin']),
		data() {
			return {
				member: null,
				CLOUDPATH: this.$config.cloudPath,
				theme: this.$config.THEME(),
				modalName: null,
				config: null,
				sigin_my:10,
				
				statistics: null,
				isGHZ: 0,
				gzh_code:'',
				notity:'',
				nofity_num: 24,
			}
		},
		onLoad(options) {
			this.$common.getConfig().then((config) => {
				this.config = config
					this.$common.getMember(true).then((member) => {
					let share_url=this.config.web_url+"h5/#/pages/member/index" + "?share_id=" + this.member.id;
					this.$jwx.readyShare(member.nickName+'邀请你加入',this.config.web_site_title,share_url,this.config.logo)	
					})
				this.getTotal();
				this.getInfo();
			})
		},
		
		onShow() {
			if (this.hasLogin) {
				this.$common.getMember().then((member) => {
					this.member = member
					
				})
				
				this.$common.rmCache('notice_count')
				this.$common.getNotifyNum().then((num) => {
					this.notity = num
				})
			}
			this.theme = this.$config.THEME()
			if (this.$refs.navbar) this.$refs.navbar.updateset()
		},
		//// #ifndef MP
		onNavigationBarButtonTap(e) {
			console.log(e)
		
		},
		// //#endif
		
		methods: {
			...mapMutations(['info', 'logout', 'channelLogout']),
			getGZH() {
				this.$http
					.get('checck_subscribe_gzh')
					.then((response) => {
						let gzh = response.data.data
						if(gzh.wechat_qrcode){
							this.gzh_code = gzh.wechat_qrcode
						}
						if(parseInt(gzh.wechat_qrcode_is_show) == 1){
							if (gzh && gzh.subscribe !== null && gzh.subscribe !== undefined && gzh.subscribe !== 0) {
								this.isGHZ = 0
							} else {
								this.isGHZ = 1
								this.modalName = 'Image'
							}	
						}
					})
					.catch((response) => {
						console.log(response)
					})
			},
			gz_win(id){
				this.$http
					.post('win_home', {id:id})
					.then((response) => {
						this.modalName =''
						if(this.statistics.w_log.is_win==1){
							// uni.redirectTo({
							// 	url: '/pages/shop/marketing/points_lottery'
							// })
							this.modalName = null
						}else{
							// uni.redirectTo({
							// 	url: '/pages/member/interval/index'
							// })
							this.modalName = null
						}
					})
					.catch((response) => {
						console.log(response)
					})
			},
			payjoin_close(id){
				this.$http
					.post('payjoin_home', {id:id})
					.then((response) => {
						this.modalName =''
					})
					.catch((response) => {
						console.log(response)
					})
			},
			onclode(id){
				this.$http
					.post('sq_home', {id:id})
					.then((response) => {
						this.modalName =''
						uni.startPullDownRefresh({})
					})
					.catch((response) => {
						console.log(response)
					})
			},
			goGZH() {
				if (this.isGHZ) {
					this.modalName = 'Image'
				}
			},
			See (e) {
				window.location.href = e
			},
			goDownload() {
				let href = this.config ? this.config.app.app_download : ''
				if (!href) {
					this.$common.showError('配置信息有误')
					return
				}
				// #ifdef APP-VUE
				plus.runtime.openURL(href, (r) => {

				})
				// #endif

				// #ifndef APP-VUE
				window.location.href = href
				// #endif
			},
			
			getTotal() {
				//this.modalName = 'not_pass'
				//this.modalName = 's_hei'
				//return false
				
				this.$http
					.get('data_home', {})
					.then((response) => {
						this.statistics = response.data.data
						if(this.statistics && this.statistics.next_data){
							if(this.statistics.next_data.id){
								this.modalName = 'next_pid'
							}
						}
					
						if(this.statistics && this.statistics.m_revice){
							if(this.statistics.m_revice.status==2){
								this.modalName = 'not_pass'
							}else if(this.statistics.m_revice.status==1){
								this.modalName = 's_hei'
							}
						}
						if(this.statistics && this.statistics.next_data){
							if(this.statistics.m_revice.status==2){
								this.modalName = 'not_pass'
							}else if(this.statistics.m_revice.status==1){
								this.modalName = 's_hei'
							}
						}
						if(this.statistics && this.statistics.w_log){
							if(this.statistics.w_log.is_win==1){
								this.modalName = 'is_win'
							}else{
								this.modalName = 'isnot_win'
							}
						}
						if(this.statistics && this.statistics.join_pay){
							if(this.statistics.join_pay.id>0){
								this.modalName = 'join_pay'
							}
						}
						
					})
					.catch((response) => {
						console.log(response)
					})
			},
			getInfo() {
				this.$http
					.get('sgin_info', {})
					.then((response) => {
						// this.sigin_my = response.data.data.sign.num
					})
					.catch((response) => {
						console.log(response)
					})
			},
			onLocation(){
				uni.startPullDownRefresh({})
			},
			onExitChannel() {
				this.channelLogout()
				this.$common.showSuccess('渠道退出成功')
			},
			showModal(e) {
				this.modalName = e.currentTarget.dataset.target
			},
			hideModal(e) {
				this.modalName = null
			},
			showService() {
				// #ifdef APP-VUE
				// window.open('https://tb.53kf.com/code/code/647cfb665881c5ee62274c0e78aaad3b0/1');
				// let url = 'https://tb.53kf.com/code/client/647cfb665881c5ee62274c0e78aaad3b0/1'
				// plus.runtime.openURL(url)
				// return;
				// #endif
				this.$refs.serviceView.show()
				// window.open('https://uclient.yunque360.com/frame.html?company_id=cjch051hm27mtl')
				// (function() {var _53code = document.createElement("script");_53code.src = "https://tb.53kf.com/code/code/647cfb665881c5ee62274c0e78aaad3b0/1";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(_53code, s);})();
				
				
			},
			showShare() {
				if (this.member) {
					this.$refs.ShareView.show({
						type: 'member',
						id: this.member.id,
						share_url: this.member.share_url,
						member_id: this.member.id,
						member_name: this.member.nickname,
						member_head: this.member.head_portrait,
						member_level: this.member.level.name,
						reget: true
					})
				}
			},
		},
		onPullDownRefresh() {
			this.$common.rmCache('member')
			if (this.hasLogin) {
				this.$common.getMember().then((member) => {
					this.member = member
					this.getTotal()
					this.getGZH()
					this.$nextTick(function() {
						uni.stopPullDownRefresh()
					})
				})
			} else {
				uni.stopPullDownRefresh()
			}
		},
		onShareAppMessage(res) {
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			let path = '/pages/member/index'
			if (this.member) path += "?share_id=" + this.member.id
			return {
				title: this.$config.APP_NAME,
				imageUrl: '',
				path: path
			}
		},
	}
</script>

<style>
	.page_footer {
		position: fixed;
		/* width: 100%; */
		/* left: 0; */
		right: 0;
		bottom: 20%;
		z-index: 9999999;
	}
	.member-view {
		margin-top: 200rpx;
	}

	.member-view .avatar {
		width: 100%;
		top: -60rpx;
		text-align: center;
	}

	.channel-login {
		right: 0;
		top: 30rpx;
	}

	.channel-login .cu-btn {
		border-radius: 40rpx 0 0 40rpx;
		padding-left: 30rpx;
	}

	.level-view {
		right: 0;
		top: 90rpx;
	}

	.level-view .cu-btn {
		border-radius: 40rpx 0 0 40rpx;
		padding-left: 0;
		background-color: #494d60;
	}

	.level-name {
		min-width: 74rpx;
		text-align: center;
	}

	.text-xxxl {
		font-size: 50rpx;
	}

	.tag {
		right: 0;
		top: 0;
	}

	.wbtn {}

	.share-btn {
		padding: 0;
		line-height: unset;
		font-size: unset;
		background-color: unset;
	}

	.share-btn::after {
		content: unset;
	}
</style>

<style>
	.top-box{
		width: 100%;
		height: 424rpx;
		position: relative;
	}
	.top-box .top-bg{
		width: 100%;
	}
	.top-box .top-content{
		width: 750rpx;
		height: 324rpx;
		padding: 0 20rpx;
		position: absolute;
		top: 0;
		left: 0;
		/* background-color: #1A181E; */
		background-image: url(../../static/red/member_back.png);
		background-size: 100% 100%;
	}
	.empty-box{
		height: 60rpx;
	}
	.notice-box{
		margin-top: 20rpx;
		display: flex;
		justify-content: flex-end;
	}
	.notice-box .notice{
		width: 42rpx;
		height: 42rpx;
		border-radius: 50%;
		/* background: #FFFFFF; */
		position: relative;
	}
	.notice image{
		width: 100%;
		height: 100%;
	}
	
	.user-info{
		margin-top: 6rpx;
		height: 110rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.user-info .avatar{
		width: 110rpx;
		height: 110rpx;
		border: 1rpx solid #eaeaea;
		border-radius: 50%;
		margin-left: 40rpx;
		margin-right: 30rpx;
		flex-shrink: 0;
	}
	.user-info .avatar image{
		width: 100%;
		height: 100%;
	}
	.user-info .info{
		padding-top: 20rpx;
		flex: 1;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}
	.info .username-setting,.level-time{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.username-setting .username{
		font-size: 32rpx;
		font-weight: bold;
		color: #ffffff;
		word-break: break-all;
		height: 20px;
		overflow: hidden;
	}
	.username-setting .note-box{
		flex-shrink: 0;
		width: 120rpx;
		height: 38rpx;
		border-radius: 10rpx;
		background-color: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.note-box image{
		width: 26rpx;
		height: 26rpx;
		flex-shrink: 0;
		margin-right: 6rpx;
	}
	.note-box .note{
		font-size: 24rpx;
		color: #6B5F13;
		font-weight: bold;
	}
	.store_ol{
		backgroound-color:#FFFFFF !important;
	}
	.level-time .level-detail{
		margin-top: 20rpx;
		/* padding: 0 20rpx; */
		height: 40rpx;
		line-height: 40rpx;
		border-radius: 20rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		/* background-color: #000000; */
	}
	.level-detail image{
		width: 220rpx;
		height: 43rpx;
		margin-right: 6rpx;
		flex-shrink: 0;
	}
	.level-detail text{
		margin-left: 40rpx;
		font-size: 22rpx;
		font-weight: bold;
		color: #ffffff;
		position: absolute;
		margin-top: 14rpx;
		transform: scale(0.8);
	}
	.level-time .time{
		font-size: 26rpx;
		color: #695F23;
	}
	
	.id-box{
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.id-box view{
		margin-top: 26rpx;
		font-size: 24rpx;
		font-weight: bold;
		color: #ffffff;
	}
</style>

<style>
	.round-white-box{
		margin: 0 20rpx;
		background: #FFFFFF;
		border-radius: 30rpx;
	}
	.my-order{
		padding: 14rpx 20rpx;
		position: relative;
		top: -120rpx;
	}
	.round-white-box .topic-line{
		padding: 0 40rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 80rpx;
	}
	.my-order .topic-line{
		border-bottom: 1rpx solid #EAEAEA;
	}
	.topic-line .title{
		font-size: 32rpx;
		font-weight: bold;
		color: #353635;
	}
	.topic-line .more{
		font-size: 26rpx;
		color: #999999;
	}
	
	.my-order .menu-list{
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}
	.my-order .menu-list .menu-item{
		flex: 25% 0 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		line-height: 50rpx;
	}
	.my-order .menu-list button{
		background: none;
		padding: 0;
		/* line-height: 40rpx; */
	}
	.my-order .menu-list button::after{
		border: none;
	}
	.my-order .menu-list .menu-item .thumb{
		width: 76rpx;
		height: 76rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
	}
	.my-order .menu-list .menu-item .thumb image{
		max-width: 76rpx;
		max-height: 76rpx;
	}
	.my-order .menu-list .menu-item .thumb text{
		position: absolute;
		top: -10rpx;
		right: -10rpx;
		z-index: 2;
		width: 30rpx;
		height: 30rpx;
		background-color: #FF0000;
		text-align: center;
		line-height: 30rpx;
		font-size: 16rpx;
		border-radius: 50%;
		overflow: hidden;
		color: #FFFFFF;
	}
	.my-order .menu-list .menu-item .name{
		margin-top: 14rpx;
		font-size: 24rpx;
		/* font-weight: bold; */
		color: #3F3F3F;
	}
</style>

<style>
	.whole-box{
		padding: 0 20rpx;
	}
	.whole-data-box{
		padding-bottom: 30rpx;
		background: #FFFFFF;
		border-radius: 18rpx;
	}
	.whole-data-box .total-action{
		padding: 0 40rpx;
		height: 160rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.total-action .total{
		flex: 1;
		margin-bottom: 20rpx;
	}
	.total .text-price{
		font-size: 50rpx;
		color: #000000;
		font-weight: bold;
	}
	.text-price-thing{
		font-size: 30rpx;
		color: #ffffff;
		font-weight: bold;
	}
	.total .txt{
		margin-top: 10rpx;
		font-size: 24rpx;
		color: #707070;
	}
	.total-action .action{
		flex-shrink: 0;
		margin-left: 20rpx;
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 30rpx;
		font-size: 24rpx;
	}
	.total-action .action.a-empty{
		color: #1A181E;
		border: 2rpx solid #1A181E;
	}
	.total-action .action.a-full-bat{
		color: #ffffff;
		background-color: #815ad7;
	}
	
	.total-action .action.a-full{
		color: #ffffff;
		background-color: rgb(254,39,114);
	}
	
	
	.item .action{
		flex-shrink: 0;
		margin-left: 20rpx;
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 30rpx;
		font-size: 24rpx;
	}
	.item .action.a-empty{
		color: #1A181E;
		border: 2rpx solid #1A181E;
	}
	.item .action.a-full-bat{
		color: #ffffff;
		background-color: #815ad7;
	}
	
	.item .action.a-full{
		color: #ffffff;
		background-color: rgb(254,39,114);
	}
	.whole-data-box .data-box{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-top: 30rpx;
		/* border-top: 1rpx solid #f5f5f5; */
	}
	.whole-data-box .data-box:first-child{
		margin-top: 0;
	}
	.data-box .item{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		/* border-right: 2rpx solid #F3F3F3; */
	}
	.data-box .item:last-child{
		border-right: 0;
	}
	.data-box.c3 .item{
		width: 33.33%;
	}
	.data-box.c4 .item{
		width: 25%;
	}
	.data-box .item .num{
		font-size: 36rpx;
		font-weight: bold;
		color: #000000;
	}
	.data-box .item .note{
		margin-top: 12rpx;
		font-size: 26rpx;
		color: #353635;
	}
</style>

<style>
	.my-service{
		margin-top: -20rpx;
		padding-bottom: 50rpx;
	}
	.my-service .menu-list{
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}
	.my-service .menu-list .menu-item{
		flex: 25% 0 0;
		margin-top: 40rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		line-height: 50rpx;
	}
	.my-service .menu-list button{
		background: none;
		padding: 0;
		/* line-height: 40rpx; */
	}
	.my-service .menu-list button::after{
		border: none;
	}
	.my-service .menu-list .menu-item .thumb{
		width: 64rpx;
		height: 64rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
	}
	.my-service .menu-list .menu-item .thumb image{
		max-width: 64rpx;
		max-height: 64rpx;
	}
	.my-service .menu-list .menu-item .thumb text{
		position: absolute;
		top: -10rpx;
		right: -10rpx;
		z-index: 2;
		width: 30rpx;
		height: 30rpx;
		background-color: #FF0000;
		text-align: center;
		line-height: 30rpx;
		font-size: 16rpx;
		border-radius: 50%;
		overflow: hidden;
		color: #FFFFFF;
	}
	.my-service .menu-list .menu-item .name{
		margin-top: 20rpx;
		font-size: 24rpx;
		/* font-weight: bold; */
		color: #000000;
	}
</style>

<style>
	.gzh-box {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 80rpx;
		padding: 0 30rpx;
		/* background-color: #0091FF; */
		background-color: #1A181E;
	}

	.gzh-box .g-txt {
		color: #ffffff;
		font-size: 28rpx;
	}

	.gzh-box .g-btn {
		padding: 10rpx 20rpx;
		border-radius: 10rpx;
		border: 4rpx #ffffff solid;
		color: #ffffff;
		font-size: 28rpx;
	}
</style>

<style>
	.cu-modal .cu-dialog {
		width: 600rpx;
		height: 700rpx;
		background-color: #FFFFFF;
	}

	.gzh_qrcode {
		width: 600rpx;
		height: 600rpx;
	}

	.close-btn {
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		background-color: #FFFFFF;
		color: #999999;
		font-size: 32rpx;
	}
	.img-show{
		background-image: url('../../static/red/gxzj.png');
	}
	.show-none{
		background-color: transparent !important;
	}
</style>